﻿Public Class BewegungsboniTabelleFern_Panzer_2
    Inherits BewegungsboniTabelle
    Public Overrides Function GetWert(ByVal Name As String) As Integer
        Dim E As ObjektEinheit = GetUnit(Name)
        Select Case E.Bewegungsart.ToUpper
            Case MovementSorts.Flugzeug.ToString.ToUpper
                Return 0
            Case MovementSorts.Helikopter.ToString.ToUpper
                Return 0
            Case MovementSorts.Transport.ToString.ToUpper
                Return 0
            Case MovementSorts.Schiff.ToString.ToUpper
                Return 0
            Case MovementSorts.Fuss.ToString.ToUpper
                Return 0
            Case MovementSorts.Mech.ToString.ToUpper
                Return 0
            Case MovementSorts.Hoellium.ToString.ToUpper
                Return 0
            Case MovementSorts.Amphibie.ToString.ToUpper
                Return 0
            Case MovementSorts.Ketten.ToString.ToUpper
                Return 2
            Case MovementSorts.Reifen.ToString.ToUpper
                Return 2
            Case MovementSorts.Schneeketten.ToString.ToUpper
                Return 2
            Case MovementSorts.Wuestenketten.ToString.ToUpper
                Return 2
            Case MovementSorts.Motorreifen.ToString.ToUpper
                Return 0
            Case Else
                Return 0
        End Select
    End Function
    Public Overrides Function ToString() As String
        Return "fernpanzer|2"
    End Function
End Class
Public Class BewegungsboniTabellePanzer_2
    Inherits BewegungsboniTabelle
    Public Overrides Function GetWert(ByVal Name As String) As Integer
        Dim E As ObjektEinheit = GetUnit(Name)
        If E.MinimaleReichweite = 1 And E.MaximaleReichweite = 1 Then
            If E.Bewegungsart.ToUpper = MovementSorts.Fuss.ToString.ToUpper Then
                Return 2
            ElseIf E.Bewegungsart.ToUpper = MovementSorts.Mech.ToString.ToUpper Then
                Return 2
            ElseIf E.Bewegungsart.ToUpper = MovementSorts.Motorreifen.ToString.ToUpper Then
                Return 2
            Else
                Return 2
            End If
        Else
            Return 0
        End If
    End Function
    Public Overrides Function ToString() As String
        Return "panzer|2"
    End Function
End Class
Public Class BewegungsboniTabelleFern_2
    Inherits BewegungsboniTabelle
    Public Overrides Function GetWert(ByVal Name As String) As Integer
        Dim E As ObjektEinheit = GetUnit(Name)
        If E.MaximaleReichweite > 1 Then
            Return 2
        Else
            Return 0
        End If
    End Function
    Public Overrides Function ToString() As String
        Return "Fernkampf|2"
    End Function
End Class
Public Class BewegungsboniTabelleFern_1
    Inherits BewegungsboniTabelle
    Public Overrides Function GetWert(ByVal Name As String) As Integer
        Dim E As ObjektEinheit = GetUnit(Name)
        If E.MaximaleReichweite > 1 Then
            Return 1
        Else
            Return 0
        End If
    End Function
    Public Overrides Function ToString() As String
        Return "Fernkampf|1"
    End Function
End Class
Public Class BewegungsboniTabelleCustomFernkampf
    Inherits BewegungsboniTabelle
    Dim Wert As Integer
    Public Sub New(ByVal Wert As Integer)
        Me.wert = Wert
    End Sub
    Public Overrides Function GetWert(ByVal Name As String) As Integer
        Dim E As ObjektEinheit = GetUnit(Name)
        If E.MaximaleReichweite > 1 Then
            Return wert
        Else
            Return 0
        End If
    End Function
    Public Overrides Function ToString() As String
        Return "Fernkampf|" + Wert.tostring
    End Function
End Class